package com.game.dao.user.draw;

import com.coment.po.UserDrawInfo;
import org.springframework.data.mongodb.repository.MongoRepository;

public interface UserDrawInfoDao extends MongoRepository<UserDrawInfo, Integer> {
    default UserDrawInfo findOrCreateById(Integer userInfoId){
        return findById(userInfoId).orElseGet(() -> save(new UserDrawInfo(userInfoId)));
    }
}
